@extends('layouts.admin')
@section('content')
	{{--<script src="{{asset('css/jquery.js')}}"></script>--}}
	{{--<script src="{{asset('js/jquery.validate.min.js')}}"></script>--}}
	{{--<script src="{{asset('js/messages_zh.js')}}"></script>--}}
	{{--<script src="http://static.runoob.com/assets/jquery-validation-1.14.0/lib/jquery.js"></script>--}}
	{{--<script src="http://static.runoob.com/assets/jquery-validation-1.14.0/dist/jquery.validate.min.js"></script>--}}
	{{--<script src="http://static.runoob.com/assets/jquery-validation-1.14.0/dist/localization/messages_zh.js"></script>--}}
	{{--<script>--}}
        {{--$.validator.setDefaults({--}}
            {{--submitHandler: function() {--}}
                {{--alert("提交事件!");--}}
            {{--}--}}
        {{--});--}}
        {{--$().ready(function() {--}}
{{--//            alert(222);--}}
            {{--$("#form").validate(function () {--}}
				{{--alert(333);--}}
            {{--});--}}
        {{--});--}}
	{{--</script>--}}
						<div id="content-header">
				<h1>友情链接管理</h1>
				<div class="btn-group">
					<a class="btn btn-large tip-bottom" title="Manage Files"><i class="icon-file"></i></a>
					<a class="btn btn-large tip-bottom" title="Manage Users"><i class="icon-user"></i></a>
					<a class="btn btn-large tip-bottom" title="Manage Comments"><i class="icon-comment"></i><span class="label label-important">5</span></a>
					<a class="btn btn-large tip-bottom" title="Manage Orders"><i class="icon-shopping-cart"></i></a>
				</div>
			</div>
			<div id="breadcrumb">
				<a href="#" title="Go to Home" class="tip-bottom"><i class="icon-home"></i>友情链接列表</a>
				<a href="#" class="current">链接添加</a>
			</div>
			<div class="container-fluid">
				<div class="row-fluid">
					<div class="span12">						
						<div class="widget-box">
							<div class="widget-title">
								<span class="icon">
									<i class="icon-th"></i>
								</span>
								{{--<span class="label label-info">用户首页</span>--}}
							</div>
							<div class="widget-content">
				
			<div class="container-fluid">
				{{--<div class="row-fluid">--}}
					<div class="span12">
						<div class="widget-box">
							<div class="widget-title">
								<span class="icon">
									<i class="icon-align-justify"></i>									
								</span>
								<h5>友情链接添加</h5>
							</div>
							<div id="err" style="color:red"></div>
								<form action="{{url('admin/CreateData')}}" method="post" class="form-horizontal" id="addform"/>
									<div class="control-group" style="width:700px;margin:0 auto">
										{{csrf_field()}}
										<label class="control-label">链接名称</label>
										<div class="controls">
											<input type="text" name="linkname" value="" id="linkname"style="width:250px;"/>
											<span id="nspan"></span>
										</div>
									</div>
									<div class="control-group" style="width:700px;margin:0 auto">
										<label class="control-label">友情链接地址</label>
										<div class="controls">
											<input type="text" name="linkurl" value="" id="linkurl" style="width:250px;"/>
											<span id="uspan"></span>
										</div>
									</div>

									<div class="form-actions" style="width:80px;margin:0 auto">
										<button type="submit" class="btn btn-primary" style="width:60px;margin-left:-140px;">添加</button>
									</div>
								</form>
							</div>
						</div>						
					</div>
				</div>
						</div>
						
					</div>
				</div>
				<div class="row-fluid">
					<div id="footer" class="span12">
						2012 &copy; Unicorn Admin. Brought to you by <a href="https://wrapbootstrap.com/user/diablo9983">diablo9983</a>
					</div>
				</div>
			{{--</div>--}}
			</div>
	<script>
		{{--判断输入的链接名称和地址是否为空--}}
		$('#linkname').blur(function()
		{
			if($('#linkname').val()=='')
			{
				 $('#nspan').html("<a style='color:red;font-size:12px;'>链接名称不能为空</a>");
			}

		});

        $('#linkurl').blur(function()
		{
            if($('#linkurl').val()=='')
            {
                $('#uspan').html("<a style='color:red;font-size:12px;'>链接地址不能为空</a>");
            }
		});


	</script>
@endsection